<div id="tab-title">
<span id="ECS_NOTICE" class="tab-front"><?php echo $this->_var['lang']['shop_notice']; ?></span>
<span id="ECS_ARTICLE" class="tab-back"><?php echo $this->_var['lang']['new_article']; ?></span>
</div>

<div class="content-div" id="ECS_NOTICE_BODY">
  <?php echo $this->_var['shop_notice']; ?>
</div>

<div class="content-div" id="ECS_ARTICLE_BODY" style="display:none" >
  <ul class="article-list">
    <?php $_from = $this->_var['new_articles']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'article');if (count($_from)):
    foreach ($_from AS $this->_var['article']):
?>
    <li>[<a href="<?php echo $this->_var['article']['cat_url']; ?>"><?php echo $this->_var['article']['cat_name']; ?></a>] <a href="<?php echo $this->_var['article']['url']; ?>" title="<?php echo htmlspecialchars($this->_var['article']['title']); ?>"><?php echo $this->_var['article']['short_title']; ?></a></li>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  </ul>
</div>
<script type="text/javascript">

  var cycleList = ['ECS_NOTICE', 'ECS_ARTICLE'];
  var tabFront = 'tab-front';
  var tabBack = 'tab-back';
  function cycleShow(obj)
  {
    var curObj;
    var curBody;
    for (i=0; i < cycleList.length; i++)
    {
      curObj = document.getElementById(cycleList[i]);
      curBody = document.getElementById(cycleList[i] + '_BODY');
      if (obj.id == curObj.id)
      {
        curObj.className = tabFront;
        curBody.style.display = "";
      }
      else
      {
        curObj.className = tabBack;
        curBody.style.display = "none";
      }
    }
  }

  // 添加事件
  for (i=0; i< cycleList.length; i++)
  {
    document.getElementById(cycleList[i]).onmousemove = function()
    {
      cycleShow(this);
    };
  }

</script>

